package com.whfc.fuum.dao;

import com.whfc.fuum.dto.SysMachTypeIconDTO;
import com.whfc.fuum.entity.SysMachTypeIcon;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface SysMachTypeIconMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysMachTypeIcon record);

    int insertSelective(SysMachTypeIcon record);

    SysMachTypeIcon selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysMachTypeIcon record);

    int updateByPrimaryKey(SysMachTypeIcon record);

    /**
     * 删除图片
     *
     * @param machTypeId
     * @return
     * @author hw
     * @date 2020/8/24 19:36
     **/
    void deleteByMachTypeId(@Param("machTypeId") Integer machTypeId);

    /**
     * 查询全部图片
     *
     * @return
     * @author hw
     * @date 2020/8/25 14:56
     **/
    List<SysMachTypeIconDTO> selectAll();

    /**
     * 查询图标
     *
     * @param code
     * @param state
     * @return
     */
    String selectIconByCodeAndState(@Param("code") String code,
                                    @Param("state") Integer state);

    /**
     * 查询图标
     *
     * @param machTypeId
     * @param state
     * @return
     */
    String selectIconByIdAndState(@Param("machTypeId") Integer machTypeId,
                                    @Param("state") Integer state);

    /**
     * 查询设备图片
     * @param machTypeId
     * @return
     */
    List<SysMachTypeIconDTO> selectIconByMachTypeId(@Param("machTypeId")Integer machTypeId);
}